Optimal. Leaf size=123 \[ \frac {B n \text {Li}_2\left (\frac {(b f-a g) (c+d x)}{(d f-c g) (a+b x)}\right )}{h (b f-a g)}-\frac {\log \left (1-\frac {(c+d x) (b f-a g)}{(a+b x) (d f-c g)}\right ) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{h (b f-a g)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.39, antiderivative size = 163, normalized size of antiderivative = 1.33, number of steps used = 10, number of rules used = 8, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {6688, 12, 6742, 36, 31, 2503, 2502, 2315} \[ \frac {B n \text {PolyLog}\left (2,\frac {(f+g x) (b c-a d)}{(a+b x) (d f-c g)}+1\right )}{h (b f-a g)}+\frac {A \log (a+b x)}{h (b f-a g)}-\frac {A \log (f+g x)}{h (b f-a g)}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(f+g x) (b c-a d)}{(a+b x) (d f-c g)}\right )}{h (b f-a g)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 36
Rule 2315
Rule 2502
Rule 2503
Rule 6688
Rule 6742
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{a f h+b g h x^2+h (b f x+a g x)} \, dx &=\int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h (a+b x) (f+g x)} \, dx\\ &=\frac {\int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (f+g x)} \, dx}{h}\\ &=\frac {\int \left (\frac {A}{(a+b x) (f+g x)}+\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (f+g x)}\right ) \, dx}{h}\\ &=\frac {A \int \frac {1}{(a+b x) (f+g x)} \, dx}{h}+\frac {B \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (f+g x)} \, dx}{h}\\ &=-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}+\frac {(A b) \int \frac {1}{a+b x} \, dx}{(b f-a g) h}-\frac {(A g) \int \frac {1}{f+g x} \, dx}{(b f-a g) h}+\frac {(B (b c-a d) n) \int \frac {\log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(a+b x) (c+d x)} \, dx}{(b f-a g) h}\\ &=\frac {A \log (a+b x)}{(b f-a g) h}-\frac {A \log (f+g x)}{(b f-a g) h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}-\frac {(B (b c-a d) n) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(b c-a d) x}{d f-c g}\right )}{1+\frac {(b c-a d) x}{d f-c g}} \, dx,x,\frac {f+g x}{a+b x}\right )}{(b f-a g) (d f-c g) h}\\ &=\frac {A \log (a+b x)}{(b f-a g) h}-\frac {A \log (f+g x)}{(b f-a g) h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}+\frac {B n \text {Li}_2\left (1+\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.27, size = 303, normalized size = 2.46 \[ -\frac {-2 A \log (a+b x)+2 B \log (f+g x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )-2 B \log (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )+2 B n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )-2 B n \log (a+b x) \log (c+d x)+2 B n \log (c+d x) \log \left (\frac {d (a+b x)}{a d-b c}\right )+2 B n \text {Li}_2\left (\frac {g (a+b x)}{a g-b f}\right )-2 B n \log (a+b x) \log (f+g x)+2 B n \log (a+b x) \log \left (\frac {b (f+g x)}{b f-a g}\right )+B n \log ^2(a+b x)+2 A \log (f+g x)-2 B n \text {Li}_2\left (\frac {g (c+d x)}{c g-d f}\right )+2 B n \log (c+d x) \log (f+g x)-2 B n \log (c+d x) \log \left (\frac {d (f+g x)}{d f-c g}\right )}{h (2 b f-2 a g)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.97, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{b g h x^{2} + a f h + {\left (b f + a g\right )} h x}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{b g h x^{2} + a f h + {\left (b f x + a g x\right )} h}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.34, size = 1447, normalized size = 11.76 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ A {\left (\frac {\log \left (b x + a\right )}{{\left (b f - a g\right )} h} - \frac {\log \left (g x + f\right )}{{\left (b f - a g\right )} h}\right )} - B \int -\frac {\log \left ({\left (b x + a\right )}^{n}\right ) - \log \left ({\left (d x + c\right )}^{n}\right ) + \log \relax (e)}{b g h x^{2} + a f h + {\left (b f h + a g h\right )} x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{h\,\left (a\,g\,x+b\,f\,x\right )+a\,f\,h+b\,g\,h\,x^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________